﻿///////////////////////////////////////////////////////////////
// This is generated code. If you modify this code, be aware
// of the fact that when you re-generate the code, your changes
// are lost. If you want to keep your changes, make this file read-only
// when you have finished your changes, however it is recommended that
// you inherit from this class to extend the functionality of this generated
// class or you modify / extend the templates used to generate this code.
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 1.0.2005.1
// Code is generated on: Friday, March 07, 2008 3:18:12 PM
// Code is generated using templates: C# template set for SqlServer (1.0.2005.1)
// Templates vendor: Solutions Design.
// Templates version: 1.0.2005.1.111705
//////////////////////////////////////////////////////////////
using System;
using System.Data;
using RPSDAL;
using RPSDAL.HelperClasses;
using SD.LLBLGen.Pro.ORMSupportClasses;

namespace RPSDAL.FactoryClasses
{
	/// <summary>
	/// Generates IEntityFields instances for different kind of Entities. 
	/// This class is generated. Do not modify.
	/// </summary>
	public partial class EntityFieldsFactory
	{
		/// <summary>
		/// Private CTor, no instantiation possible.
		/// </summary>
		private EntityFieldsFactory()
		{
		}


		/// <summary>General factory entrance method which will return an EntityFields object with the format generated by the factory specified</summary>
		/// <param name="relatedEntityType">The type of entity the fields are for</param>
		/// <returns>The IEntityFields instance requested</returns>
		public static IEntityFields CreateEntityFieldsObject(EntityType relatedEntityType)
		{
			IEntityFields fieldsToReturn=null;
			switch(relatedEntityType)
			{
				case RPSDAL.EntityType.AvailableToContactTypeEntity:
					fieldsToReturn = CreateAvailableToContactTypeEntityFields();
					break;
				case RPSDAL.EntityType.BusinessRuleEntity:
					fieldsToReturn = CreateBusinessRuleEntityFields();
					break;
				case RPSDAL.EntityType.BusinessRuleMailedContactEntity:
					fieldsToReturn = CreateBusinessRuleMailedContactEntityFields();
					break;
				case RPSDAL.EntityType.CallEntity:
					fieldsToReturn = CreateCallEntityFields();
					break;
				case RPSDAL.EntityType.CallFinishedDropdownFieldValueEntity:
					fieldsToReturn = CreateCallFinishedDropdownFieldValueEntityFields();
					break;
				case RPSDAL.EntityType.CallFinishedPageFieldEntity:
					fieldsToReturn = CreateCallFinishedPageFieldEntityFields();
					break;
				case RPSDAL.EntityType.CallFinishedValueEntity:
					fieldsToReturn = CreateCallFinishedValueEntityFields();
					break;
				case RPSDAL.EntityType.ContactEntity:
					fieldsToReturn = CreateContactEntityFields();
					break;
				case RPSDAL.EntityType.ContactFieldEntity:
					fieldsToReturn = CreateContactFieldEntityFields();
					break;
				case RPSDAL.EntityType.ContactFileEntity:
					fieldsToReturn = CreateContactFileEntityFields();
					break;
				case RPSDAL.EntityType.ContactGroupEntity:
					fieldsToReturn = CreateContactGroupEntityFields();
					break;
				case RPSDAL.EntityType.ContactGroupMemberEntity:
					fieldsToReturn = CreateContactGroupMemberEntityFields();
					break;
				case RPSDAL.EntityType.ContactHistoryEntity:
					fieldsToReturn = CreateContactHistoryEntityFields();
					break;
				case RPSDAL.EntityType.ContactPageDropdownFieldValueEntity:
					fieldsToReturn = CreateContactPageDropdownFieldValueEntityFields();
					break;
				case RPSDAL.EntityType.ContactPageFieldEntity:
					fieldsToReturn = CreateContactPageFieldEntityFields();
					break;
				case RPSDAL.EntityType.ContactTypeEntity:
					fieldsToReturn = CreateContactTypeEntityFields();
					break;
				case RPSDAL.EntityType.LetterEntity:
					fieldsToReturn = CreateLetterEntityFields();
					break;
				case RPSDAL.EntityType.MailSettingEntity:
					fieldsToReturn = CreateMailSettingEntityFields();
					break;
				case RPSDAL.EntityType.RoleEntity:
					fieldsToReturn = CreateRoleEntityFields();
					break;
				case RPSDAL.EntityType.SettingEntity:
					fieldsToReturn = CreateSettingEntityFields();
					break;
				case RPSDAL.EntityType.TemplateEntity:
					fieldsToReturn = CreateTemplateEntityFields();
					break;
				case RPSDAL.EntityType.UserEntity:
					fieldsToReturn = CreateUserEntityFields();
					break;
				case RPSDAL.EntityType.UserLogEntity:
					fieldsToReturn = CreateUserLogEntityFields();
					break;
				case RPSDAL.EntityType.UserResponsibleForPrintingLettersEntity:
					fieldsToReturn = CreateUserResponsibleForPrintingLettersEntityFields();
					break;
				case RPSDAL.EntityType.WelcomeTemplateEntity:
					fieldsToReturn = CreateWelcomeTemplateEntityFields();
					break;
			}
			return fieldsToReturn;
		}
		
		/// <summary>General method which will return an array of IEntityFieldCore objects, used by the InheritanceInfoProvider. Only the fields defined in the entity are returned, no inherited fields.</summary>
		/// <param name="entityName">the name of the entity to get the fields for. Example: "CustomerEntity"</param>
		/// <returns>array of IEntityFieldCore fields, defined in the entity with the name specified</returns>
		internal static IEntityFieldCore[] CreateFields(string entityName)
		{
			IEntityFieldCore[] toReturn = null;
			switch(entityName)
			{
				default:
					break;
			}
			return toReturn;
		}

		/// <summary>General factory entrance method which will return a TypedView EntityFields object with the format generated by the factory specified</summary>
		/// <param name="relatedTypedViewType">The type of typed view the fields are for</param>
		/// <returns>The IEntityFields instance requested</returns>
		public static IEntityFields CreateTypedViewEntityFieldsObject(TypedViewType relatedTypedViewType)
		{
			IEntityFields fieldsToReturn=null;
			switch(relatedTypedViewType)
			{
				case TypedViewType.VTemplateTypedView:
					fieldsToReturn = CreateVTemplateTypedViewEntityFields();
					break;
				case TypedViewType.VTemplateDevTypedView:
					fieldsToReturn = CreateVTemplateDevTypedViewEntityFields();
					break;
			}
			return fieldsToReturn;
		}

		/// <summary>Creates a complete EntityFields instance for the AvailableToContactTypeEntity.</summary>
		private static IEntityFields CreateAvailableToContactTypeEntityFields()
		{

			IEntityFields fieldsToReturn = new EntityFields((int)AvailableToContactTypeFieldIndex.AmountOfFields, InheritanceInfoProviderSingleton.GetInstance());
			for(int i=0;i<(int)AvailableToContactTypeFieldIndex.AmountOfFields;i++)
			{
				fieldsToReturn[i] = EntityFieldFactory.Create((AvailableToContactTypeFieldIndex)i);
			}
			return fieldsToReturn;
		}
	

		/// <summary>Creates a complete EntityFields instance for the BusinessRuleEntity.</summary>
		private static IEntityFields CreateBusinessRuleEntityFields()
		{

			IEntityFields fieldsToReturn = new EntityFields((int)BusinessRuleFieldIndex.AmountOfFields, InheritanceInfoProviderSingleton.GetInstance());
			for(int i=0;i<(int)BusinessRuleFieldIndex.AmountOfFields;i++)
			{
				fieldsToReturn[i] = EntityFieldFactory.Create((BusinessRuleFieldIndex)i);
			}
			return fieldsToReturn;
		}
	

		/// <summary>Creates a complete EntityFields instance for the BusinessRuleMailedContactEntity.</summary>
		private static IEntityFields CreateBusinessRuleMailedContactEntityFields()
		{

			IEntityFields fieldsToReturn = new EntityFields((int)BusinessRuleMailedContactFieldIndex.AmountOfFields, InheritanceInfoProviderSingleton.GetInstance());
			for(int i=0;i<(int)BusinessRuleMailedContactFieldIndex.AmountOfFields;i++)
			{
				fieldsToReturn[i] = EntityFieldFactory.Create((BusinessRuleMailedContactFieldIndex)i);
			}
			return fieldsToReturn;
		}
	

		/// <summary>Creates a complete EntityFields instance for the CallEntity.</summary>
		private static IEntityFields CreateCallEntityFields()
		{

			IEntityFields fieldsToReturn = new EntityFields((int)CallFieldIndex.AmountOfFields, InheritanceInfoProviderSingleton.GetInstance());
			for(int i=0;i<(int)CallFieldIndex.AmountOfFields;i++)
			{
				fieldsToReturn[i] = EntityFieldFactory.Create((CallFieldIndex)i);
			}
			return fieldsToReturn;
		}
	

		/// <summary>Creates a complete EntityFields instance for the CallFinishedDropdownFieldValueEntity.</summary>
		private static IEntityFields CreateCallFinishedDropdownFieldValueEntityFields()
		{

			IEntityFields fieldsToReturn = new EntityFields((int)CallFinishedDropdownFieldValueFieldIndex.AmountOfFields, InheritanceInfoProviderSingleton.GetInstance());
			for(int i=0;i<(int)CallFinishedDropdownFieldValueFieldIndex.AmountOfFields;i++)
			{
				fieldsToReturn[i] = EntityFieldFactory.Create((CallFinishedDropdownFieldValueFieldIndex)i);
			}
			return fieldsToReturn;
		}
	

		/// <summary>Creates a complete EntityFields instance for the CallFinishedPageFieldEntity.</summary>
		private static IEntityFields CreateCallFinishedPageFieldEntityFields()
		{

			IEntityFields fieldsToReturn = new EntityFields((int)CallFinishedPageFieldFieldIndex.AmountOfFields, InheritanceInfoProviderSingleton.GetInstance());
			for(int i=0;i<(int)CallFinishedPageFieldFieldIndex.AmountOfFields;i++)
			{
				fieldsToReturn[i] = EntityFieldFactory.Create((CallFinishedPageFieldFieldIndex)i);
			}
			return fieldsToReturn;
		}
	

		/// <summary>Creates a complete EntityFields instance for the CallFinishedValueEntity.</summary>
		private static IEntityFields CreateCallFinishedValueEntityFields()
		{

			IEntityFields fieldsToReturn = new EntityFields((int)CallFinishedValueFieldIndex.AmountOfFields, InheritanceInfoProviderSingleton.GetInstance());
			for(int i=0;i<(int)CallFinishedValueFieldIndex.AmountOfFields;i++)
			{
				fieldsToReturn[i] = EntityFieldFactory.Create((CallFinishedValueFieldIndex)i);
			}
			return fieldsToReturn;
		}
	

		/// <summary>Creates a complete EntityFields instance for the ContactEntity.</summary>
		private static IEntityFields CreateContactEntityFields()
		{

			IEntityFields fieldsToReturn = new EntityFields((int)ContactFieldIndex.AmountOfFields, InheritanceInfoProviderSingleton.GetInstance());
			for(int i=0;i<(int)ContactFieldIndex.AmountOfFields;i++)
			{
				fieldsToReturn[i] = EntityFieldFactory.Create((ContactFieldIndex)i);
			}
			return fieldsToReturn;
		}
	

		/// <summary>Creates a complete EntityFields instance for the ContactFieldEntity.</summary>
		private static IEntityFields CreateContactFieldEntityFields()
		{

			IEntityFields fieldsToReturn = new EntityFields((int)ContactFieldFieldIndex.AmountOfFields, InheritanceInfoProviderSingleton.GetInstance());
			for(int i=0;i<(int)ContactFieldFieldIndex.AmountOfFields;i++)
			{
				fieldsToReturn[i] = EntityFieldFactory.Create((ContactFieldFieldIndex)i);
			}
			return fieldsToReturn;
		}
	

		/// <summary>Creates a complete EntityFields instance for the ContactFileEntity.</summary>
		private static IEntityFields CreateContactFileEntityFields()
		{

			IEntityFields fieldsToReturn = new EntityFields((int)ContactFileFieldIndex.AmountOfFields, InheritanceInfoProviderSingleton.GetInstance());
			for(int i=0;i<(int)ContactFileFieldIndex.AmountOfFields;i++)
			{
				fieldsToReturn[i] = EntityFieldFactory.Create((ContactFileFieldIndex)i);
			}
			return fieldsToReturn;
		}
	

		/// <summary>Creates a complete EntityFields instance for the ContactGroupEntity.</summary>
		private static IEntityFields CreateContactGroupEntityFields()
		{

			IEntityFields fieldsToReturn = new EntityFields((int)ContactGroupFieldIndex.AmountOfFields, InheritanceInfoProviderSingleton.GetInstance());
			for(int i=0;i<(int)ContactGroupFieldIndex.AmountOfFields;i++)
			{
				fieldsToReturn[i] = EntityFieldFactory.Create((ContactGroupFieldIndex)i);
			}
			return fieldsToReturn;
		}
	

		/// <summary>Creates a complete EntityFields instance for the ContactGroupMemberEntity.</summary>
		private static IEntityFields CreateContactGroupMemberEntityFields()
		{

			IEntityFields fieldsToReturn = new EntityFields((int)ContactGroupMemberFieldIndex.AmountOfFields, InheritanceInfoProviderSingleton.GetInstance());
			for(int i=0;i<(int)ContactGroupMemberFieldIndex.AmountOfFields;i++)
			{
				fieldsToReturn[i] = EntityFieldFactory.Create((ContactGroupMemberFieldIndex)i);
			}
			return fieldsToReturn;
		}
	

		/// <summary>Creates a complete EntityFields instance for the ContactHistoryEntity.</summary>
		private static IEntityFields CreateContactHistoryEntityFields()
		{

			IEntityFields fieldsToReturn = new EntityFields((int)ContactHistoryFieldIndex.AmountOfFields, InheritanceInfoProviderSingleton.GetInstance());
			for(int i=0;i<(int)ContactHistoryFieldIndex.AmountOfFields;i++)
			{
				fieldsToReturn[i] = EntityFieldFactory.Create((ContactHistoryFieldIndex)i);
			}
			return fieldsToReturn;
		}
	

		/// <summary>Creates a complete EntityFields instance for the ContactPageDropdownFieldValueEntity.</summary>
		private static IEntityFields CreateContactPageDropdownFieldValueEntityFields()
		{

			IEntityFields fieldsToReturn = new EntityFields((int)ContactPageDropdownFieldValueFieldIndex.AmountOfFields, InheritanceInfoProviderSingleton.GetInstance());
			for(int i=0;i<(int)ContactPageDropdownFieldValueFieldIndex.AmountOfFields;i++)
			{
				fieldsToReturn[i] = EntityFieldFactory.Create((ContactPageDropdownFieldValueFieldIndex)i);
			}
			return fieldsToReturn;
		}
	

		/// <summary>Creates a complete EntityFields instance for the ContactPageFieldEntity.</summary>
		private static IEntityFields CreateContactPageFieldEntityFields()
		{

			IEntityFields fieldsToReturn = new EntityFields((int)ContactPageFieldFieldIndex.AmountOfFields, InheritanceInfoProviderSingleton.GetInstance());
			for(int i=0;i<(int)ContactPageFieldFieldIndex.AmountOfFields;i++)
			{
				fieldsToReturn[i] = EntityFieldFactory.Create((ContactPageFieldFieldIndex)i);
			}
			return fieldsToReturn;
		}
	

		/// <summary>Creates a complete EntityFields instance for the ContactTypeEntity.</summary>
		private static IEntityFields CreateContactTypeEntityFields()
		{

			IEntityFields fieldsToReturn = new EntityFields((int)ContactTypeFieldIndex.AmountOfFields, InheritanceInfoProviderSingleton.GetInstance());
			for(int i=0;i<(int)ContactTypeFieldIndex.AmountOfFields;i++)
			{
				fieldsToReturn[i] = EntityFieldFactory.Create((ContactTypeFieldIndex)i);
			}
			return fieldsToReturn;
		}
	

		/// <summary>Creates a complete EntityFields instance for the LetterEntity.</summary>
		private static IEntityFields CreateLetterEntityFields()
		{

			IEntityFields fieldsToReturn = new EntityFields((int)LetterFieldIndex.AmountOfFields, InheritanceInfoProviderSingleton.GetInstance());
			for(int i=0;i<(int)LetterFieldIndex.AmountOfFields;i++)
			{
				fieldsToReturn[i] = EntityFieldFactory.Create((LetterFieldIndex)i);
			}
			return fieldsToReturn;
		}
	

		/// <summary>Creates a complete EntityFields instance for the MailSettingEntity.</summary>
		private static IEntityFields CreateMailSettingEntityFields()
		{

			IEntityFields fieldsToReturn = new EntityFields((int)MailSettingFieldIndex.AmountOfFields, InheritanceInfoProviderSingleton.GetInstance());
			for(int i=0;i<(int)MailSettingFieldIndex.AmountOfFields;i++)
			{
				fieldsToReturn[i] = EntityFieldFactory.Create((MailSettingFieldIndex)i);
			}
			return fieldsToReturn;
		}
	

		/// <summary>Creates a complete EntityFields instance for the RoleEntity.</summary>
		private static IEntityFields CreateRoleEntityFields()
		{

			IEntityFields fieldsToReturn = new EntityFields((int)RoleFieldIndex.AmountOfFields, InheritanceInfoProviderSingleton.GetInstance());
			for(int i=0;i<(int)RoleFieldIndex.AmountOfFields;i++)
			{
				fieldsToReturn[i] = EntityFieldFactory.Create((RoleFieldIndex)i);
			}
			return fieldsToReturn;
		}
	

		/// <summary>Creates a complete EntityFields instance for the SettingEntity.</summary>
		private static IEntityFields CreateSettingEntityFields()
		{

			IEntityFields fieldsToReturn = new EntityFields((int)SettingFieldIndex.AmountOfFields, InheritanceInfoProviderSingleton.GetInstance());
			for(int i=0;i<(int)SettingFieldIndex.AmountOfFields;i++)
			{
				fieldsToReturn[i] = EntityFieldFactory.Create((SettingFieldIndex)i);
			}
			return fieldsToReturn;
		}
	

		/// <summary>Creates a complete EntityFields instance for the TemplateEntity.</summary>
		private static IEntityFields CreateTemplateEntityFields()
		{

			IEntityFields fieldsToReturn = new EntityFields((int)TemplateFieldIndex.AmountOfFields, InheritanceInfoProviderSingleton.GetInstance());
			for(int i=0;i<(int)TemplateFieldIndex.AmountOfFields;i++)
			{
				fieldsToReturn[i] = EntityFieldFactory.Create((TemplateFieldIndex)i);
			}
			return fieldsToReturn;
		}
	

		/// <summary>Creates a complete EntityFields instance for the UserEntity.</summary>
		private static IEntityFields CreateUserEntityFields()
		{

			IEntityFields fieldsToReturn = new EntityFields((int)UserFieldIndex.AmountOfFields, InheritanceInfoProviderSingleton.GetInstance());
			for(int i=0;i<(int)UserFieldIndex.AmountOfFields;i++)
			{
				fieldsToReturn[i] = EntityFieldFactory.Create((UserFieldIndex)i);
			}
			return fieldsToReturn;
		}
	

		/// <summary>Creates a complete EntityFields instance for the UserLogEntity.</summary>
		private static IEntityFields CreateUserLogEntityFields()
		{

			IEntityFields fieldsToReturn = new EntityFields((int)UserLogFieldIndex.AmountOfFields, InheritanceInfoProviderSingleton.GetInstance());
			for(int i=0;i<(int)UserLogFieldIndex.AmountOfFields;i++)
			{
				fieldsToReturn[i] = EntityFieldFactory.Create((UserLogFieldIndex)i);
			}
			return fieldsToReturn;
		}
	

		/// <summary>Creates a complete EntityFields instance for the UserResponsibleForPrintingLettersEntity.</summary>
		private static IEntityFields CreateUserResponsibleForPrintingLettersEntityFields()
		{

			IEntityFields fieldsToReturn = new EntityFields((int)UserResponsibleForPrintingLettersFieldIndex.AmountOfFields, InheritanceInfoProviderSingleton.GetInstance());
			for(int i=0;i<(int)UserResponsibleForPrintingLettersFieldIndex.AmountOfFields;i++)
			{
				fieldsToReturn[i] = EntityFieldFactory.Create((UserResponsibleForPrintingLettersFieldIndex)i);
			}
			return fieldsToReturn;
		}
	

		/// <summary>Creates a complete EntityFields instance for the WelcomeTemplateEntity.</summary>
		private static IEntityFields CreateWelcomeTemplateEntityFields()
		{

			IEntityFields fieldsToReturn = new EntityFields((int)WelcomeTemplateFieldIndex.AmountOfFields, InheritanceInfoProviderSingleton.GetInstance());
			for(int i=0;i<(int)WelcomeTemplateFieldIndex.AmountOfFields;i++)
			{
				fieldsToReturn[i] = EntityFieldFactory.Create((WelcomeTemplateFieldIndex)i);
			}
			return fieldsToReturn;
		}
	

		/// <summary>Creates a complete EntityFields instance for the VTemplateEntity.</summary>
		/// <returns></returns>
		private static IEntityFields CreateVTemplateTypedViewEntityFields()
		{
			IEntityFields fieldsToReturn = new EntityFields((int)VTemplateFieldIndex.AmountOfFields, null);
			for(int i=0;i<(int)VTemplateFieldIndex.AmountOfFields;i++)
			{
				fieldsToReturn[i] = EntityFieldFactory.Create((VTemplateFieldIndex)i);
			}
			return fieldsToReturn;
		}

		/// <summary>Creates a complete EntityFields instance for the VTemplateDevEntity.</summary>
		/// <returns></returns>
		private static IEntityFields CreateVTemplateDevTypedViewEntityFields()
		{
			IEntityFields fieldsToReturn = new EntityFields((int)VTemplateDevFieldIndex.AmountOfFields, null);
			for(int i=0;i<(int)VTemplateDevFieldIndex.AmountOfFields;i++)
			{
				fieldsToReturn[i] = EntityFieldFactory.Create((VTemplateDevFieldIndex)i);
			}
			return fieldsToReturn;
		}

		#region Included Code

		#endregion
	}
}
